/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package accountmanager.factory;

import accountmanager.dao.ifc.ClienteDAO;
import accountmanager.dao.ifc.ContaDAO;
import accountmanager.dao.impl.MemoryClienteDAO;
import accountmanager.dao.impl.MemoryContaDAO;
/**
 *
 * @author Afonso
 */
public class Factory {
    private ClienteDAO clienteDAO;

    private ContaDAO contaDAO;

    public ClienteDAO createClienteDAO() {
        if (clienteDAO == null)
            clienteDAO = new MemoryClienteDAO();

        return clienteDAO;
    }

    public ContaDAO createContaDAO() {
        if (contaDAO == null)
            contaDAO = new MemoryContaDAO();

        return contaDAO;
    }
}
